//
//  CustomCell.m
//  ZAKER
//
//  Created by dllo  on 15/9/2.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "CustomCell.h"

@implementation CustomCell

- (void)dealloc
{
    [_newsImageView release];
    [_newsLabel release];
    [_newsTitleLabel release];
    
    [super dealloc];
}

- (UIImageView *)newsImageView
{
    
    if (_newsImageView == nil) {
        self.newsImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10 * myWidth, 10 * myHeight, 90 * myWidth, 80 * myHeight)];
    }
    return _newsImageView;
    
}

- (UILabel *)newsTitleLabel
{
    if (_newsTitleLabel == nil) {
        
        self.newsTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(110 * myWidth, self.frame.origin.y + 10 * myHeight, 250 * myWidth, 20 * myHeight)];
        
    }
    
    return _newsTitleLabel;
    
}

- (UILabel *)newsLabel
{
    if (_newsLabel == nil) {
        
        self.newsLabel = [[UILabel alloc] initWithFrame:CGRectMake(110 * myWidth, self.frame.origin.y + 40 * myHeight, 250 * myWidth, 50 * myHeight)];
        self.newsLabel.font = [UIFont systemFontOfSize:15.0f];
        self.newsLabel.alpha = 0.6f;
        _newsLabel.numberOfLines = 2;
        
    }
    
    return _newsLabel;
    
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self.contentView addSubview:self.newsImageView];
        [self.contentView addSubview:self.newsLabel];
        [self.contentView addSubview:self.newsTitleLabel];
        
        [_newsImageView release];
        [_newsTitleLabel release];
        [_newsLabel release];
        
        self.frame = CGRectMake(0, 0, self.frame.size.width, _newsImageView.frame.size.height + 20 * myHeight);
    }
    
    return self;
}



- (void)awakeFromNib
{
   
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    
    [super setSelected:selected animated:animated];

}

@end
